package com.naiterui.ehp.bs.recommend.remote;

import java.util.List;
import java.util.Set;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.naiterui.ehp.bp.bo.consult.VideoConsultBO;
import com.naiterui.ehp.bp.bo.consult.VideoConsultMessageBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;

/**
 * @author luao
 * @date 2021/2/26 11:02 上午
 **/
@FeignClient(name = "recomVideoConsult", url = "${ehp.domain.videoConsult}", configuration = FeignConfiguration.class)
public interface VideoConsultFeignClient {

    @PostMapping("/inner/video/consult/message/save")
    VideoConsultMessageBO saveVideoConsultMessage(@RequestBody VideoConsultMessageBO videoConsultMessageBO);

    @Async
    @PostMapping("/inner/video/consult/message/getByRecomId")
    VideoConsultMessageBO getByRecomId(@RequestParam("recomId") Long recomId) throws BusinessException;

    @PostMapping("/inner/supervise/getVideoConsultMessage")
    List<VideoConsultMessageBO> getVideoConsultMessage(@RequestBody List<String> contents,
        @RequestParam("type") Integer type);

    @PostMapping("/inner/video/consult/getVideoConsults")
    List<VideoConsultBO> getVideoConsults(@RequestBody Set<Long> videoConsultIds);

    @GetMapping("/inner/video/consult/getVideoConsultById")
    VideoConsultBO getVideoConsult(@RequestParam("videoConsultId") Long videoConsultId);

}
